jQuery(function($) {
    //  导航条
    var mySwiper = new Swiper('.box', {
        slidesPerView: 1,
        pagination: '.swiper-pagination',
        paginationClickable: true,

    });

    var swiper = new Swiper('.content>.swiper-container', {
        pagination: '.swiper-pagination',
        paginationClickable: true,
        onInit: function (swiper) { //动画
            swiperAnimate(swiper);
        },

        onTransitionEnd: function (swiper) {
            $('.navs').eq(swiper.activeIndex) //跟着下标滑动
                .addClass('active')
                .siblings()
                .removeClass('active');
        }
    });
    //下标
    $('.navs').click(function () {
        $(this).addClass('active')
            .siblings()
            .removeClass('active');
        swiper.slideTo($(this).index(), 1000)
    });


    //    轮播
    var swiper = new Swiper('._lk', {
        pagination: '.swiper-pagination',
        nextButton: '.swiper-button-next',
        prevButton: '.swiper-button-prev',
        paginationClickable: true,
        spaceBetween: 30,
        centeredSlides: true,
        autoplay: 2500,
        autoplayDisableOnInteraction: false
    });
    //   左右导航
    var swiper1 = new Swiper('.asw', {
        slidesPerView: 4,
        freeMode: true,
        freeModeMomentumRatio: 0.5
    })
    //   上下导航
    var swiper = new Swiper('.sx', {
        pagination: '.swiper-pagination',   
        paginationClickable: true,
        direction: 'vertical',
        slidesPerView: 1,
        autoplay:1200,
        loop:true,
        freeModeMomentumRatio: 0.5
    });
    // 获取
    $.ajax({
        type: "GET",
        url: "json/index2.json",
        async: true,
        success: function (res) {
            var str = template('temp', {
                nff: res
            });
            $('.neirong').html(str);
        }
    })



  


})